//
//  MyClass.m
//  ipadclient
//
//  Created by Stéphane Prohaszka on 27/04/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Speaker.h"


@implementation Speaker

@synthesize identification;
@synthesize fullname;
@synthesize bio;

- (id)initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    
    if (self) {
        identification = [aDecoder decodeIntForKey:@"identification"];
        fullname = [aDecoder decodeObjectForKey:@"fullname"];
        bio = [aDecoder decodeObjectForKey:@"bio"];
    }
    
    return self;
}

- (void)dealloc {
    [fullname release];
    [bio release];
    [super dealloc];
}

- (id)copyWithZone:(NSZone *)zone {
    Speaker* copy = [[[self class] allocWithZone:zone] init];
    copy.identification = self.identification;
    copy.fullname = [self.fullname copyWithZone:zone];
    copy.bio = [self.bio copyWithZone:zone];
    
    return copy;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
	[aCoder encodeInt:identification forKey:@"identification"];
	[aCoder encodeObject:fullname forKey:@"fullname"];
	[aCoder encodeObject:bio forKey:@"bio"];
}


@end
